'use strict';

module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1521211542390_9730';
  // add your config here
  config.middleware = ['cors'];
  config.cors = {
    origin:'*'
  }
  config.wechat = {
    appID:'wx31b38dc272f5abb4',
    appSecret:'eea0238c01f0925c1e633b4a0458a20a',
    token:'thisismyfirstwebchatapp'
  };
  config.client = {
    url: 'http://wechat.littlebearbbb.cn'
  }
  
  config.mongoose = {
    client: {
      url: 'mongodb://47.92.167.157:11235/egg-wechat',
      options: {},
    },
  };

  config.security = {
    csrf: false,
    methodnoallow:{
      enable: false
    }
  };


  // config.security = {
  //   csrf: {
  //     // 判断是否需要 ignore 的方法，请求上下文 context 作为第一个参数
  //     ignore:'/'
  //   },
  // }

  return config;
};
